﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YearCheckRecordForm.aspx.cs"
    Inherits="YhmOA.Integrated.Car.YearCheckRecordForm" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxLoadingPanel" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link type="text/css" rel="Stylesheet" href="../../Styles/Common.css" />
    <script type="text/javascript" src="../../Scripts/jquery-1.5.2.min.js"></script>
    <script type="text/javascript" src="../../Scripts/include.jquery.js"></script>
    <script type="text/javascript" src="../../Scripts/Common.js"></script>
    <script src="../../Scripts/DevEx.js" type="text/javascript"></script>
    <script type="text/javascript">
        function Save(s, e) {
            if (ASPxClientEdit.ValidateEditorsInContainer(null)) {
                cbSaveCtrl.PerformCallback();
                lpSaveCtrl.Show();
                $(this).wijdialog('close');
            }
        };
        function SaveCallback(s, e) {
            if (s.cpIsSucceed == true) {
                lpSaveCtrl.SetText('提交成功');
                parent.Search();
                window.setTimeout(function () { lpSaveCtrl.Hide(); lpSaveCtrl.SetText('正在提交信息,请稍后...'); }, 1500);
            } else {
                lpSaveCtrl.SetText('提交失败');
                window.setTimeout(function () { lpSaveCtrl.Hide(); lpSaveCtrl.SetText('正在提交信息,请稍后...'); }, 1500);
            }
        };
        //重置文本框
        function ResetEdit(s, e) {
            ASPxClientEdit.ClearEditorsInContainer(null);
            txt_AddressCtrl.Focus();
            txt_PlateNumCtrl.Focus();
            lpSaveCtrl.SetText('正在提交信息,请稍后...');
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="MainRound">
        <div class="MainRoundContent">
            <div class="MainRoundContentW">
                <div class="MainBody">
                    <table class="Table" style="width: 370px">
                        <tr>
                            <td style="width: 120px">
                                车牌号码：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_PlateNum" runat="server" Width="200px" TabIndex="1" ClientInstanceName="txt_PlateNumCtrl"
                                    Spacing="0" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" ClientIDMode="AutoID"
                                    ValueType="System.String">
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus"/>
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入车牌号码"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请输入车牌号码">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                年检时间：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxDateEdit ID="txt_CheckTime" ClientInstanceName="txt_CheckTimeCtrl" runat="server"
                                    TabIndex="2" NullText="请选择年检时间" Width="200px" Spacing="0" EditFormat="DateTime"
                                    PopupVerticalAlign="TopSides">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择年检时间"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxDateEdit>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                下次年检时间：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxDateEdit ID="txt_NextCheckTime" ClientInstanceName="txt_NextCheckTimeCtrl"
                                    runat="server" TabIndex="3" NullText="请选择下次年检时间" Width="200px" Spacing="0" EditFormat="DateTime"
                                    PopupVerticalAlign="TopSides">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择下次年检时间"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxDateEdit>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                年检地点：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_Address" runat="server" Width="200px" TabIndex="4" ClientInstanceName="txt_AddressCtrl"
                                    Spacing="0" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" ClientIDMode="AutoID"
                                    ValueType="System.String">
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus"/>
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入年检地点"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请输入年检地点">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                经办人：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_Operator" ClientInstanceName="txt_OperatorCtrl" runat="server"
                                    MaxLength="50" NullText="请输入经办人" TabIndex="5" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入经办人"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                备注：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxMemo ID="txt_Remarks" runat="server" MaxLength="250" NullText="请输入备注" Height="50px"
                                    ClientInstanceName="txt_RemarksCtrl" TabIndex="6" Width="200px">
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table class="TableNoBorder" style="width: 370px">
                        <tr>
                            <td colspan="2" />
                            <td align="left" style="margin-right: 20px; width: 100px">
                                <dx:ASPxButton ID="btnSave" runat="server" Text="保  存" Width="80px" AutoPostBack="false"
                                    TabIndex="4">
                                    <ClientSideEvents Click="Save" />
                                </dx:ASPxButton>
                            </td>
                            <td align="left" style="margin-right: 20px; width: 100px">
                                <dx:ASPxButton ID="btnCancel" runat="server" Text="重  置" Width="80px" TabIndex="5" AutoPostBack="false">
                                    <ClientSideEvents Click="ResetEdit" />
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxCallback ID="cbSave" runat="server" ClientInstanceName="cbSaveCtrl" OnCallback="cbSave_Callback">
                        <ClientSideEvents CallbackComplete="SaveCallback" />
                    </dx:ASPxCallback>
                    <dx:ASPxLoadingPanel ID="lpSave" runat="server" Text="正在提交信息,请稍后..." ClientInstanceName="lpSaveCtrl">
                    </dx:ASPxLoadingPanel>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
